from db import db


class OAuthClient(db.Model):
    __tablename__ = 't_oauth_client'

    id = db.Column(db.Integer, primary_key=True, autoincrement=True)
    client_id = db.Column(db.String(100), unique_key=True, nullable=False)
    secret_key = db.Column(db.String(32), unique_key=True, nullable=False)
    expires_at = db.Column(db.DateTime)
    created_at = db.Column(db.Integer)

    def __repr__(self):
        return '<OAuthClient {self.name}>'
